package fan.project1_SpeedTalkSystem.Dao;

import fan.project1_SpeedTalkSystem.Mapper.UserMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class myApplicationRunner implements ApplicationRunner {
    @Autowired
    UserMapper userMapper;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("项目启启动时验证数据库连接：");
        userMapper.getUserInfoById(1);
    }
}
